Related Vulnerabilities: CVE-2021-24122  

A security issue was found in Apache Tomcat 10.0.0-M1 to 10.0.0-M9, 9.0.0-M1 to 9.0.39 and 8.5.0 to 8.5.59. When serving resources from a network location using the NTFS file system it was possible to bypass security constraints and/or view the source code for JSPs in some configurations. The root cause was the unexpected behaviour of the JRE API File.getCanonicalPath() which in turn was caused by the inconsistent behaviour of the Windows API (FindFirstFileW) in some circumstances.

Severity High

Remote Yes

Type Information disclosure

Description

A security issue was found in Apache Tomcat 10.0.0-M1 to 10.0.0-M9, 9.0.0-M1 to 9.0.39 and 8.5.0 to 8.5.59. When serving resources from a network location using the NTFS file system it was possible to bypass security constraints and/or view the source code for JSPs in some configurations. The root cause was the unexpected behaviour of the JRE API File.getCanonicalPath() which in turn was caused by the inconsistent behaviour of the Windows API (FindFirstFileW) in some circumstances.

AVG-1453 tomcat8 8.5.59-2 8.5.60-1 High Fixed

AVG-1452 tomcat9 9.0.39-2 9.0.40-1 High Fixed

https://www.openwall.com/lists/oss-security/2021/01/14/1
https://bz.apache.org/bugzilla/show_bug.cgi?id=64871
https://tomcat.apache.org/security-9.html#Fixed_in_Apache_Tomcat_9.0.40
https://github.com/apache/tomcat/commit/935fc5582dc25ae10bab6f9d5629ff8d996cb533
https://tomcat.apache.org/security-8.html#Fixed_in_Apache_Tomcat_8.5.60
https://github.com/apache/tomcat/commit/920dddbdb981f92e8d5872a4bb126a10af5ca8a9